package com.timoon.testng;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import com.timoon.sample.dao.ResourceDAO;

/**
 *<p></p>
 *<p></p>
 *<p>Copyright:Copyright(c)2013</p>
 *<p>Company:timoon</p>
 *@author 付乐天
 *@version 1.0 */

public class DAOtest {
	private static BeanFactory factory;
	
	@BeforeClass
	public static void initFactory(){
		factory=new ClassPathXmlApplicationContext("applicationContext.xml");
	}
	
	@Test
	public void resourceDAO(){
		ResourceDAO dao=(ResourceDAO) factory.getBean("resourceDAOImpl");
	}
}
